# Template Makefile

.NOTPARALLEL:

LAUNCHER = @default_prefix@-runner-default

all:@for_backends( @backend_prefix@-all)@ $(LAUNCHER)

install:@for_backends( @backend_prefix@-install)@ $(LAUNCHER)-install

clean:@for_backends( @backend_prefix@-clean)@

test:@for_backends( @backend_prefix@-test)@

qregex-test:@for_backends( @backend_prefix@-qregex-test)@

@include(Makefile-common)@

@for_backends(@ctx_include(Makefile)@)@

@nfp(t/*/*.t)@: all
	$(PROVE) -r -v --exec @nfp(./nqp@bat@)@ $@

manifest:
	echo MANIFEST >MANIFEST
	git ls-files >>MANIFEST

release: manifest
	[ -n "$(VERSION)" ] || ( echo "\nTry 'make release VERSION=yyyy.mm'\n\n"; exit 1 )
	bash -c '[ "$$(cat VERSION)" == "$(VERSION)" ] || ( echo -e "\nVersion on command line and in VERSION file differ\n"; exit 1 )'
	[ -d nqp-$(VERSION) ] || ln -s . nqp-$(VERSION)
	$(PERL5) -ne 'print "nqp-$(VERSION)/$$_"' MANIFEST |\
	    tar -zcv --owner=0 --group=0 --numeric-owner -T - -f nqp-$(VERSION).tar.gz
	rm nqp-$(VERSION)

distclean: realclean

realclean: clean
	$(RM_F) Makefile MANIFEST config.status nqp$(BAT)

testclean:

# vim: ft=make noexpandtab ts=4 sw=4
